﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wolfpack.Core;
using Wolfpack.Core.Interfaces.Entities;
using Wolfpack.Core.Interfaces.Magnum;
using Wolfpack.Core.Interfaces.Castle;

namespace Wolfpack.Contrib.Filters.MacAddress
{
    public class MacAddressFilter : Wolfpack.Core.Filters.ResultFilterBase
    {
        public List<string> MacAddresses { get; set; }

        protected override bool ShouldPublish(IHealthCheckResultPublisher publisher, HealthCheckResult message)
        {
            Logger.Debug("Checking for MacAddresses.");
            foreach (string macAddress in MacAddresses)
            {
                if (macAddress == message.Check.Geo.Latitude)
                {
                    return false;
                }
            }
            return true;
        }
    }
}
